package com.initialize.appapi.service;

import com.initialize.pub.dao.SiteDAO;
import com.initialize.pub.mybatis.plus.entity.Site;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * User: jane
 * Date: 2020/3/15
 * Time: 6:14 下午
 * Description:
 */
@Service
public class SiteService {
    @Autowired
    SiteDAO siteDAO;


    public Site getById(String site_title) {


        return siteDAO.selKey(site_title);
    }

    public boolean update(Site site) {
        return siteDAO.update(site.getKey(), site.getValue()) == 1;
    }

}